package com.group11.user.vo;

import com.group11.user.contants.EnterpriseConstants;
import com.group11.user.entity.Enterprise;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class EnterpriseVo {

    private int id;
    private String name;
    private int userId;
    private String type;
    private String industry;
    private String scale;
    private String address;
    private String description;
    private String contact;
    private String phoneNumber;
    private String logo;

    public EnterpriseVo(Enterprise enterprise) {
        this.id = enterprise.getId();
        this.name = enterprise.getName();
        this.userId = enterprise.getUserId();
        this.type = EnterpriseConstants.ent_types.get(enterprise.getType());
        this.industry = EnterpriseConstants.industries.get(enterprise.getIndustry());
        this.scale = EnterpriseConstants.ent_num.get(enterprise.getScale());
        this.address = enterprise.getAddress();
        this.description = enterprise.getDescription();
        this.contact = enterprise.getContact();
        this.phoneNumber = enterprise.getPhoneNumber();
        this.logo = enterprise.getLogo();
    }
}
